This invention relates generally to methods and systems for modeling physical systems using Finite Element problem analysis and, more specifically, to methods and systems for creating a Finite Element simulator for modeling fluid flow in porous media. Even more particularly, this invention relates to methods and systems for generating software code using a symbolic language translator.
Mathematical models to simulate the behavior of physical systems can be both time consuming and complex to create. In particular, Finite Element problems in multiple dimensions (for example, the four dimensions of space and time) are almost intractable for humans. These types of problems are so complex that the analysis becomes too difficult for humans to do without error. As the number of dimensions that the problem encompasses increases, the problem itself becomes almost exponentially more difficult in terms of both the actual computations and the difficulty of the computations that must be performed. One method of dealing with the problem of the intractability of multiple-dimension Finite Element problems is symbolic manipulation. Symbolic manipulation involves the translation of mathematical formulas into a symbolic representation that can be used to generate programming code for use in a simulator to model a physical system.
However, currently existing methods of symbolic manipulation are prone to error due to their dependence on a human formulation of the necessary mathematical equations and the translation of those equations into programming code. Human errors can occur in at least two areas. One area is the algebraic calculations, where errors such as dropping of signs or transcription errors can occur. Another area where human error can occur is in the translation of the algebra into code in a programming language such as Fortran, C++, or some other high-level programming language.
Furthermore, even assuming that the person performing the translation of algebraic formulas into programming language code performs the translation 100% correctly, the resulting code may still not be as efficient or concise as desired. For example, the code may be slow, it may be overly large and complex, or it may contain more floating point operations than are necessary.
More importantly, currently existing methods and systems for creating simulators to model physical systems require a large amount of human capital in the form of skilled analysts who must be both conversant with high level mathematics to generate the complex equations needed, and who are also skilled programmers to generate the necessary code from the mathematical formulations. Alternatively, it would take teams of specialized mathematicians and programmers to analyze the problems, formulate the mathematical equations and write the corresponding code. It is both expensive and time consuming to either find people who are skilled in both these aspects, or in having to increase the number of personnel needed to solve such problems by having separate analysts and programmers.
Similarly, research in the area of Finite Element problem analysis has been both difficult and slow, because it takes months or even years to take a new Finite Element method or a new physics and perform all the work necessary to prove that the method or physics are viable. As a result, it has been very expensive and not always feasible in an economically viable amount of time to generate new simulators to model physical systems.
Therefore, a need exists for a method and system for generating software code using a symbolic language translator that can efficiently solve multi-dimensional Finite Element problems that are too intractable for humans to solve, such as generating simulators for modeling fluid flow in porous media, and which reduce the intensive computer time necessary to solve such problems.
A further need exists for a method and system for generating software code using a symbolic language translator that significantly reduces or eliminates the propensity for human error inherent to the manipulation of complex mathematical formulas and to the translation of those mathematical formulas into a programming language code.
A still further need exists for a method and system for generating software code using a symbolic language translator that significantly improves the performance of the programming code generated from the symbolic translation of mathematical formula that are solved to create a model of a physical system. The performance of the code generated from such a method and system can have increased speed, less complexity, and a lesser number of floating point operations.
An even further need exists for a method and system for generating software code using a symbolic language translator that provides for rapid prototyping by improving the development process for a simulator for generating a mathematical model of a physical system, such as the fluid flow in a porous media. Such a method and system would make it possible to generate the simulator in an economically viable amount of time.
Even further, a need exists for a method and system for generating software code using a symbolic language translator that significantly reduces the dependency of prior such systems on specialized personnel such as analysts/programmers that had to be conversant in both the mathematics of the physical modeling process and have the programming skill necessary to translate the mathematics into programming code.
Still further, a need exists for a method and system for generating software code using a symbolic language translator that provides the capability to decrease research turn-around time by providing a means for generating a new simulator from either a new Finite Element method or using a new physics in a shorter period of time than the current such methods and systems.
In accordance with the present invention, a method and system for generating software code using a symbolic language translator is provided that substantially eliminates or reduces the disadvantages and problems associated with previously developed such systems and methods. In particular, the present invention provides an improved method and system for creating on a computer a native operators and test code file for a finite element simulator to model fluid flow in porous media. The method of the present invention includes the steps of inputting into a symbolic language translator equations and parameters describing the model to be created by the simulator and generating one or more model objects from the equations and parameters. The method of the present invention further includes the steps of generating a symbolic representation of the residual and tangent matrix operators of the model objects and generating optimization rules for any geometric invariant quantities. Numeric core code and data structure initializing core code are generated for the simulator in a high level programming language from the language of the symbolic language translator. The numeric core code is formatted and optimized and a file is generated containing the formatted and optimized numeric core code and the data structure initializing core code.
The present invention provides an important technical advantage by generating software code, using a symbolic language translator, that can efficiently solve multi-dimensional Finite Element problems that are too intractable for humans to solve, such as generating simulators for modeling fluid flow in porous media, and which reduce the intensive computer time necessary to solve such problems.
The present invention provides another technical advantage by generating software code using a symbolic language translator that significantly reduces or eliminates the propensity for human error inherent to the manipulation of complex mathematical formulas and to the translation of those mathematical formulas into a programming language code.
The present invention provides yet another technical advantage by generating software code using a symbolic language translator that significantly improves the performance of the programming code generated from the symbolic translation of mathematical formula that are solved to create a model of a physical system. The performance of the code generated from such a method and system can provide increased speed, less complexity, and a lesser number of floating point operations.
The present invention provides yet another technical advantage by generating software code using a symbolic language translator that provides for rapid prototyping by improving the development process for a simulator for generating a mathematical model of a physical system, such as the fluid flow in a porous media. Such a method and system would make it possible to generate the simulator in an economically viable amount of time.
The present invention provides yet another technical advantage by generating software code using a symbolic language translator that significantly reduces the dependency of prior such systems on specialized personnel such as analysts/programmers that had to be conversant in both the mathematics of the physical modeling process and have the programming skill necessary to translate the mathematics into programming code.
The present invention provides yet another technical advantage by generating software code using a symbolic language translator that provides the capability to decrease research turn-around time by providing a means for generating a new simulator from either a new Finite Element method or using a new physics in a shorter period of time than the current such methods and systems.